<?php global $wp_theme_options; // at the top because we use the variables multiple times in this file ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">

<!--The Title-->
<title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' :: '; } ?><?php bloginfo('name'); ?></title>

<!--To Follow, or Not to Follow-->
<?php if(is_home() || is_single() || is_page()) {echo '<meta name="robots" content="index,follow" />';} ?>
<?php if($wp_theme_options['cat_index'] != 'no' && is_category()) {echo '<meta name="robots" content="index,follow" />';} elseif(!is_home() && !is_single() && !is_page()) {echo '<meta name="robots" content="noindex,follow" />'; } ?>

<!--Add Description and Keywords-->
<?php if (is_single() || is_page() ) : if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php if($wp_theme_options['tag_as_keyword'] != 'no' && is_single()) : ?>
<meta name="keywords" content="<?php $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { echo $tag->name . ',';  }}?>" />
<?php endif; ?>
<meta name="description" content="<?php the_excerpt_rss(); ?>" />
<?php endwhile; endif; else : ?> 
<meta name="description" content="<?php bloginfo('description'); ?>" />
<?php endif; ?>

<!--The Favicon-->
<link rel="shortcut icon" href="<?php bloginfo('template_url'); ?>/images/favicon.gif" type="image/x-icon" />

<!--The Meta Info-->
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<?php wp_meta(); //we need this for plugins ?>

<!--The Stylesheets-->
<style type="text/css" media="screen">
    @import url( <?php bloginfo('stylesheet_url'); ?> );
    @import url(<?php bloginfo('stylesheet_directory'); ?>/css/menu.css);
    @import url(<?php bloginfo('stylesheet_directory'); ?>/css/jtabber.css);
    @import url(<?php bloginfo('stylesheet_directory'); ?>/css/custom.css);
</style>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/print.css" type="text/css" media="print" />
<!--The Internet Explorer Specific Stuff-->
<!--[if lte IE 7]>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/lte-ie7.css" type="text/css" media="screen" />
<![endif]-->
<!--[if lt IE 7]>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/lt-ie7.css" type="text/css" media="screen" />
    <script src="<?php bloginfo('template_url'); ?>/js/dropdown.js" type="text/javascript"></script>
<![endif]-->

<!--Some necessary javascript stuff-->
<?php wp_print_scripts(); ?>
<script type="text/javascript">
jQuery(document).ready(function(){
		jQuery.jtabber({
			mainLinkTag: "#nav a", // much like a css selector, you must have a 'title' attribute that links to the div id name
			activeLinkClass: "selected", // class that is applied to the tab once it's clicked
			hiddenContentClass: "hiddencontent", // the class of the content you are hiding until the tab is clicked
			showDefaultTab: 1, // 1 will open the first tab, 2 will open the second etc.  null will open nothing by default
			showErrors: false, // true/false - if you want errors to be alerted to you
			effect: null, // null, 'slide' or 'fade' - do you want your content to fade in or slide in?
			effectSpeed: 'fast' // 'slow', 'medium' or 'fast' - the speed of the effect
		});
});
</script>

<!--The RSS and Pingback-->
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php if($wp_theme_options['feedburner_url']) echo $wp_theme_options['feedburner_url']; else bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

<?php wp_head(); //we need this for plugins ?>
</head>
<body>

<div id="header" class="clearfix">
    <?php $img = get_theme_mod('header_image');
        if ($img == 'remove-header'){
            echo '<div class="left-title">';
        } else {
            echo '<div class="left">';
        }
    ?>
        <a href="<?php bloginfo('url'); ?>"><?php bloginfo('title'); ?></a>
        
    </div>
    <div class="right">
        <div id="toplinks">
            <span><?php wp_register('', ' &bull;'); ?></span>
            <span><?php wp_loginout(); ?></span> &bull;
            <span class="feed"><a href="<?php if($wp_theme_options['feedburner_url']) echo $wp_theme_options['feedburner_url']; else bloginfo('rss2_url'); ?>" title="Subscribe via RSS">Subscribe</a></span>
        </div>
        <div id="search">
            <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
            <input type="text" value="Search..." name="s" id="s" onfocus="if (this.value == 'Search...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search...';}" />
            </form>
        </div>
    </div>
</div>

<?php get_template_file('menu.php'); //Pull the navigation menu code ?>

<div id="container" class="clearfix">